Regenerate ERD as a colour-coded SVG with a generator script - #2174
Draft
ArturWieczorek wants to merge 1 commit into
Draft
Regenerate ERD as a colour-coded SVG with a generator script#2174ArturWieczorek wants to merge 1 commit into
ArturWieczorek wants to merge 1 commit into
Conversation
…pt (#1204) The committed doc/ERD.png was a ~1.9 MB binary last updated in 2022 (before Conway and the Hasql rewrite), and its generation was never documented, so it bloated the repo on every update and went stale. Replace it with a diffable SVG plus a script anyone can run to regenerate it. - doc/ERD.svg: the current schema as one colour-coded map (tables grouped by subsystem, PK/FK marked, crow's-foot relationships, legend), ~320 KB vector instead of a 1.9 MB PNG. - scripts/generate-erd.sh: builds a throwaway database, applies every migration, reads tables/columns/PKs, takes the FK relationships from the migration SQL (the constraints are dropped at run time for insert speed), and renders the SVG. - scripts/gen-erd.py: the graphviz generator (domain colours, PK/FK, crow's feet). - flake.nix: add graphviz and python3 to the dev shell. - Readme.md: point the ERD link at the SVG and note how to regenerate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1204
The committed doc/ERD.png was a ~1.9 MB binary last updated in 2022 (before Conway and the Hasql rewrite), and its generation was never documented, so it bloated the repo on every update and went stale. Replace it with a diffable SVG plus a script anyone can run to regenerate it.
Description
Add your description here, if it fixes a particular issue please provide a link to the issue.
Checklist
fourmoluon version 0.17.0.0 (which can be run withscripts/fourmolize.sh)Migrations
If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.